package com.supor.aiot.food.view;

import android.content.Context;
import android.graphics.Rect;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

import com.supor.aiot.food.R;

public class OneItemDecoration extends RecyclerView.ItemDecoration {

    private Context mContext;

    public OneItemDecoration(Context mContext) {
        this.mContext = mContext;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        outRect.left = mContext.getResources().getDimensionPixelSize(R.dimen.dp_15);
        outRect.right = mContext.getResources().getDimensionPixelSize(R.dimen.dp_15);
    }
}
